import React, { useState } from 'react';
import { Button, Drawer } from 'antd';
import EditForm from "./EditForm"
export default (props) => {
  const {item, options,trees, onOk, open, onCancel, title} = props;
  // const [open, setOpen] = useState(true);


  const onClose = () => {
    // setOpen(false);
    onCancel();
  };
  return (
    <>
      <Drawer title={title} width={800} onClose={onCancel} open={open}>

        <EditForm item={item} onOk={(item)=>{ onOk(item)}} options={options} trees={trees} onClose={onClose} />

      </Drawer>
    </>
  );
};
